/* Foundation v2.1.3 http://foundation.zurb.com */
$(document).ready(function () {

	/* Use this js doc for all application specific JS */

	/* TABS --------------------------------- */
	/* Remove if you don't need :) */

	function activateTab($tab) {
	  var $activeTab = $tab.closest('dl').find('a.active'),
	      contentLocation = $tab.attr("href") + 'Tab';

	  //Make Tab Active
	  $activeTab.removeClass('active');
	  $tab.addClass('active');

    //Show Tab Content
		$(contentLocation).closest('.tabs-content').find('li').hide();
		$(contentLocation).show();
	}

	$('dl.tabs').each(function () {
		//Get all tabs
		var tabs = $(this).children('dd').children('a');
		tabs.click(function (e) {
		  activateTab($(this));
		});
	});

	if (window.location.hash) {
    activateTab($('a[href="' + window.location.hash + '"]'));
  }
	$('ul#myRoundabout').roundabout({
	         btnNext: '#next',
	         btnPrev: '#previous',
	         minScale: 0.1 // tiny!
	      });

	$('input, textarea').placeholder();
	
	//Deze moeten van te voren gehide worden.
	$('.fadeindiv').hide();
	$('#fade').click(function() {
	  $('#myRoundabout').fadeOut('slow', function() {
		$('.fadeindiv').fadeIn(100);    // Animation complete.
	   });
	});
	
	$('#closediv').click(function() {  
		$('.fadeindiv').fadeOut('slow', function() {
			 $('#myRoundabout').fadeIn('slow');
		}); 
	});  
	

});
